package br.com.cicero.designpatterns.factory;

import br.com.cicero.designpatterns.command.BaseCommand;

/**
 * Factory method estatico
 * @author cicero
 *
 */
public class CommandFactory1 {
	
	public BaseCommand create(String name) {
		
		BaseCommand command = null;
		
		if (name.equals("EnviarPedido")) {
			
			command = new EnviarPorEmail();
			
		} else if (name.equals("GerarPDF")) {
			
			command = new GerarPDF();
			
		}
		
		return command;
		
	}
	

}
